docs: use |[ ]| instead of <programlisting></programlisting>
authorWilliam Jon McCann <william.jon.mccann@gmail.com>
Mon, 27 Jan 2014 17:12:55 +0000 (12:12 -0500)
committerWilliam Jon McCann <william.jon.mccann@gmail.com>
Wed, 29 Jan 2014 17:45:49 +0000 (12:45 -0500)
https://bugzilla.gnome.org/show_bug.cgi?id=723119

77 files changed:
gdk/gdk.c
gdk/gdkapplaunchcontext.c
gdk/gdkdisplay.c
gdk/gdkdisplaymanager.c
gdk/gdkevents.h
gdk/gdkkeys.c
gdk/gdkpango.c
gdk/gdkwindow.h
gdk/wayland/gdkwindow-wayland.c
gtk/deprecated/gtkactiongroup.c
gtk/deprecated/gtkactivatable.c
gtk/deprecated/gtkiconfactory.c
gtk/deprecated/gtkrc.c
gtk/deprecated/gtkstyle.c
gtk/deprecated/gtktable.c
gtk/deprecated/gtkuimanager.c
gtk/gtkaboutdialog.c
gtk/gtkaccellabel.c
gtk/gtkapplication.c
gtk/gtkapplicationwindow.c
gtk/gtkbindings.c
gtk/gtkbuilder.c
gtk/gtkcellarea.c
gtk/gtkcelllayout.c
gtk/gtkcomboboxtext.c
gtk/gtkcontainer.c
gtk/gtkcsscustomproperty.c
gtk/gtkcssprovider.c
gtk/gtkdialog.c
gtk/gtkdrawingarea.c
gtk/gtkeditable.c
gtk/gtkentry.c
gtk/gtkexpander.c
gtk/gtkfilechooser.c
gtk/gtkfilechooserbutton.c
gtk/gtkfilechooserdialog.c
gtk/gtkfilefilter.c
gtk/gtkframe.c
gtk/gtkicontheme.c
gtk/gtkimage.c
gtk/gtkimcontext.c
gtk/gtkinfobar.c
gtk/gtklabel.c
gtk/gtklevelbar.c
gtk/gtkliststore.c
gtk/gtkmain.c
gtk/gtkmenu.c
gtk/gtkmenuitem.c
gtk/gtkmenutoolbutton.c
gtk/gtkmessagedialog.c
gtk/gtknotebook.c
gtk/gtkpagesetup.c
gtk/gtkpaned.c
gtk/gtkprintcontext.c
gtk/gtkprintoperation.c
gtk/gtkprintunixdialog.c
gtk/gtkradiobutton.c
gtk/gtkradiomenuitem.c
gtk/gtkrecentchooserdialog.c
gtk/gtkrecentfilter.c
gtk/gtksearchbar.c
gtk/gtksettings.c
gtk/gtksizegroup.c
gtk/gtksocket.c
gtk/gtkspinbutton.c
gtk/gtkstylecontext.c
gtk/gtktexttagtable.c
gtk/gtkthemingengine.c
gtk/gtktogglebutton.c
gtk/gtktreemodel.c
gtk/gtktreemodelfilter.c
gtk/gtktreemodelsort.c
gtk/gtktreestore.c
gtk/gtktreeview.c
gtk/gtkwidget.c
gtk/gtkwidgetpath.c
gtk/gtkwindow.c

index a1fee6c476ce938609fc920ef72aa6ebcecfa809..3bc27f5ef2cc1a92756aafee7d4c9dfd51b066b8 100644 (file)
--- a/gdk/gdk.c
+++ b/gdk/gdk.c
@@ -502,8 +502,7 @@ gdk_init (int *argc, char ***argv)
  *
  * A minimal main program for a threaded GTK+ application
  * looks like:
- * <informalexample>
- * <programlisting role="C">
+ * |[
  * int
  * main (int argc, char *argv[])
  * {
@@ -522,8 +521,7 @@ gdk_init (int *argc, char ***argv)
  *
  *   return 0;
  * }
- * </programlisting>
- * </informalexample>
+ * ]|
  *
  * Callbacks require a bit of attention. Callbacks from GTK+ signals
  * are made within the GTK+ lock. However callbacks from GLib (timeouts,
@@ -534,8 +532,7 @@ gdk_init (int *argc, char ***argv)
  *
  * Erik Mouw contributed the following code example to
  * illustrate how to use threads within GTK+ programs.
- * <informalexample>
- * <programlisting role="C">
+ * |[
  * /<!---->*-------------------------------------------------------------------------
  *  * Filename:      gtk-thread.c
  *  * Version:       0.99.1
@@ -672,8 +669,7 @@ gdk_init (int *argc, char ***argv)
  *
  *   return 0;
  * }
- * </programlisting>
- * </informalexample>
+ * ]|
  *
  * Unfortunately, all of the above documentation holds with the X11
  * backend only. With the Win32 or Quartz backends, GDK and GTK+ calls
index 3fbcf7241640ca425d0757a85a8ab5af368be7e4..bfad9ba28acd223820b61844e5e3d36006918885 100644 (file)
@@ -36,8 +36,7 @@
  * screen or workspace.
  * <example>
  * <title>Launching an application</title>
- * <informalexample>
- * <programlisting>
+ * |[
  * GdkAppLaunchContext *context;
  *
  * context = gdk_display_get_app_launch_context (display);
@@ -49,8 +48,7 @@
  *   g_warning ("Launching failed: %s\n", error->message);
  *
  * g_object_unref (context);
- * </programlisting>
- * </informalexample>
+ * ]|
  * </example>
  */
 
index 6e9bd20487fdca7d6b2dda9f764638aab4c3ae5e..a29c1061dadd2298c295b8013dcfa1e38a0f08f9 100644 (file)
@@ -2115,7 +2115,7 @@ static GQueue gdk_error_traps = G_QUEUE_INIT;
  *
 * <example>
  * <title>Trapping an X error</title>
- * <programlisting>
+ * |[
  * gdk_error_trap_push (<!-- -->);
  *
  *  // ... Call the X function which may cause an error here ...
@@ -2125,7 +2125,7 @@ static GQueue gdk_error_traps = G_QUEUE_INIT;
  *  {
  *    // ... Handle the error here ...
  *  }
- * </programlisting>
+ * ]|
  * </example>
  */
 void
index 94f857eb52f255e866c7b6246ceba0a28e2640ee..2262722d31d92073765da859154ab8a35b85ed05 100644 (file)
@@ -87,7 +87,7 @@
  *
  * <example id="backend-specific">
  * <title>Backend-specific code</title>
- * <programlisting>
+ * |[
  * #ifdef GDK_WINDOWING_X11
  *   if (GDK_IS_X11_DISPLAY (display))
  *     {
  *   else
  * #endif
  *   g_error ("Unsupported GDK backend");
- * </programlisting>
+ * ]|
  * </example>
  */
 
@@ -225,9 +225,9 @@ static const gchar *allowed_backends;
  * By default, GDK tries all included backends.
  *
  * For example,
- * <programlisting>
+ * |[
  * gdk_set_allowed_backends ("wayland,quartz,*");
- * </programlisting>
+ * ]|
  * instructs GDK to try the Wayland backend first,
  * followed by the Quartz backend, and then all
  * others.
index 8425466e23396adc658741e813071d7613bec842..d3209b7a75491efc9b5f63513f9e4b16f6ec2be3 100644 (file)
@@ -1142,36 +1142,30 @@ struct _GdkEventDND {
  * The event type is always the first field in all of the event types, and
  * can always be accessed with the following code, no matter what type of
  * event it is:
- * <informalexample>
- * <programlisting>
+ * |[
  *   GdkEvent *event;
  *   GdkEventType type;
  *
  *   type = event->type;
- * </programlisting>
- * </informalexample>
+ * ]|
  *
  * To access other fields of the event, the pointer to the event
  * can be cast to the appropriate event type, or the union member
  * name can be used. For example if the event type is %GDK_BUTTON_PRESS
  * then the x coordinate of the button press can be accessed with:
- * <informalexample>
- * <programlisting>
+ * |[
  *   GdkEvent *event;
  *   gdouble x;
  *
  *   x = ((GdkEventButton*)event)->x;
- * </programlisting>
- * </informalexample>
+ * ]|
  * or:
- * <informalexample>
- * <programlisting>
+ * |[
  *   GdkEvent *event;
  *   gdouble x;
  *
  *   x = event->button.x;
- * </programlisting>
- * </informalexample>
+ * ]|
  */
 union _GdkEvent
 {
index f29303f3aca03fe6f0c2f9b9614f67f8292bd57d..1573f9204aed22f01d02ba192438d3f39c6f2428 100644 (file)
@@ -503,7 +503,7 @@ gdk_keymap_lookup_key (GdkKeymap          *keymap,
  * <literal>&lt;Control&gt;plus</literal> accelerator &lt;Shift&gt; should
  * be masked out.
  * </para>
- * <informalexample><programlisting>
+ * |[
  * &sol;* We want to ignore irrelevant modifiers like ScrollLock *&sol;
  * &num;define ALL_ACCELS_MASK (GDK_CONTROL_MASK | GDK_SHIFT_MASK | GDK_MOD1_MASK)
  * gdk_keymap_translate_keyboard_state (keymap, event->hardware_keycode,
@@ -512,18 +512,18 @@ gdk_keymap_lookup_key (GdkKeymap          *keymap,
  * if (keyval == GDK_PLUS &&
  *     (event->state &amp; ~consumed &amp; ALL_ACCELS_MASK) == GDK_CONTROL_MASK)
  *   &sol;* Control was pressed *&sol;
- * </programlisting></informalexample>
+ * ]|
  * <para>
  * An older interpretation @consumed_modifiers was that it contained
  * all modifiers that might affect the translation of the key;
  * this allowed accelerators to be stored with irrelevant consumed
  * modifiers, by doing:</para>
- * <informalexample><programlisting>
+ * |[
  * &sol;* XXX Don't do this XXX *&sol;
  * if (keyval == accel_keyval &&
  *     (event->state &amp; ~consumed &amp; ALL_ACCELS_MASK) == (accel_mods &amp; ~consumed))
  *   &sol;* Accelerator was pressed *&sol;
- * </programlisting></informalexample>
+ * ]|
  * <para>
  * However, this did not work if multi-modifier combinations were
  * used in the keymap, since, for instance, <literal>&lt;Control&gt;</literal>
index ca5745beb27f012eb1d47b549f3e367d59df4c12..68a21cb9e020b80cf0af5fd9c44835ff3e651124 100644 (file)
@@ -53,7 +53,7 @@
  * <title>Draw transformed text with Pango and cairo</title>
  * <!-- Note that this example is basically the same as
  *      demos/gtk-demo/rotated_text.c -->
- * <programlisting>
+ * |[
  * #define RADIUS 100
  * #define N_WORDS 10
  * #define FONT "Sans Bold 18"
  *
  * g_object_unref (layout);
  * g_object_unref (context);
- * </programlisting>
+ * ]|
  * </example>
  * <figure>
  *   <title>Output of <xref linkend="rotated-example"/></title>
index 6bb66dbc152802981947ddc352fe48f31feec69d..adf2d42df9ea66ec843a9d9e1315867bd2afb46b 100644 (file)
@@ -421,7 +421,7 @@ struct _GdkWindowAttr
  * Here's an example of how the terminal example would be implemented, assuming
  * a terminal area widget called "terminal" and a toplevel window "toplevel":
  *
- * <informalexample><programlisting><![CDATA[
+ * |[
  *     GdkGeometry hints;
  *
  *     hints.base_width = terminal->char_width;
@@ -437,7 +437,7 @@ struct _GdkWindowAttr
  *                                 GDK_HINT_RESIZE_INC |
  *                                 GDK_HINT_MIN_SIZE |
  *                                 GDK_HINT_BASE_SIZE);
- * ]]></programlisting></informalexample>
+ * ]|
  *
  * The other useful fields are the @min_aspect and @max_aspect fields; these
  * contain a width/height ratio as a floating point number. If a geometry widget
index 2b4325b00c0eaae39fd5453fd714f7251f46c2d6..9ebb3b39334298786c23c00a0305c1b00c42f6f7 100644 (file)
@@ -2275,8 +2275,7 @@ gdk_wayland_window_get_wl_surface (GdkWindow *window)
  * This function should be called before a #GdkWindow is shown. This is
  * best done by connecting to the #GtkWidget::realize signal:
  *
- * <informalexample>
- * <programlisting>
+ * |[
  *   static void
  *   widget_realize_cb (GtkWidget *widget)
  *   {
@@ -2297,8 +2296,7 @@ gdk_wayland_window_get_wl_surface (GdkWindow *window)
  *   {
  *     g_signal_connect (window, "realize", G_CALLBACK (widget_realize_cb), NULL);
  *   }
- * </programlisting>
- * </informalexample>
+ * ]|
  *
  * Since: 3.10
  */
index 01c2d53370953dd850071e6e04bb11e34c77539d..6daf7174fec397d7fa45a189be54131a654c4f2d 100644 (file)
@@ -70,7 +70,7 @@
  * </para>
  * <example>
  * <title>A #GtkDialog UI definition fragment.</title>
- * <programlisting><![CDATA[
+ * |[
  * <object class="GtkActionGroup" id="actiongroup">
  *   <child>
  *       <object class="GtkAction" id="About">
@@ -81,7 +81,7 @@
  *       <accelerator key="F1" modifiers="GDK_CONTROL_MASK | GDK_SHIFT_MASK"/>
  *   </child>
  * </object>
- * ]]></programlisting>
+ * ]|
  * </example>
  * </refsect2>
  */
index 072b2cc5307302f83707ff2654e22cb520ecbf32..1a8fc806667c3d819d26342311451fe349352522 100644 (file)
@@ -41,7 +41,7 @@
  * </para>
  * <example>
  * <title>A class fragment implementing #GtkActivatable</title>
- * <programlisting><![CDATA[
+ * |[
  *
  * enum {
  * ...
  *     foo_bar_set_label (button, gtk_action_get_label (action));
  * 
  *   ...
- * }]]></programlisting>
+ * }]|
  * </example>
  * </refsect2>
  */
index 8d4da50bcee785b200cb76a46c11fb1b86a525f6..accf8f15436d2569ad70e48b5a33124d2bdabb85 100644 (file)
  * </variablelist>
  * <example>
  * <title>A #GtkIconFactory UI definition fragment.</title>
- * <programlisting><![CDATA[
+ * |[
  * <object class="GtkIconFactory" id="iconfactory1">
  *   <sources>
  *     <source stock-id="apple-red" filename="apple-red.png"/>
  *     </object>
  *   </child>
  * </object>
- * ]]>
- * </programlisting>
+ * ]|
  * </example>
  * </para>
  * </refsect2>
index 0639672aa8f9a80ed8ed7643258063c0333c14a9..b763a1b050d79251d78729e9ee0cf031745b959f 100644 (file)
  * and <literal>class</literal> declarations. As an example
  * of such a statement:
  *
- * <informalexample><programlisting>
+ * |[
  * widget "mywindow.*.GtkEntry" style "my-entry-class"
- * </programlisting></informalexample>
+ * ]|
  *
  * attaches the style <literal>"my-entry-class"</literal> to all
  * widgets  whose <firstterm>widget path</firstterm> matches the
  * Since GTK+ 2.10, <literal>widget_class</literal> paths can also contain
  * <literal>&lt;classname&gt;</literal> substrings, which are matching
  * the class with the given name and any derived classes. For instance,
- * <informalexample><programlisting>
+ * |[
  * widget_class "*&lt;GtkMenuItem&gt;.GtkLabel" style "my-style"
- * </programlisting></informalexample>
+ * ]|
  * will match #GtkLabel widgets which are contained in any kind of menu item.
  *
  * So, if you have a #GtkEntry named <literal>"myentry"</literal>, inside of a
  * Matching against class is a little different. The pattern match is done
  * against all class names in the widgets class hierarchy (not the layout
  * hierarchy) in sequence, so the pattern:
- * <informalexample><programlisting>
+ * |[
  * class "GtkButton" style "my-style"
- * </programlisting></informalexample>
+ * ]|
  * will match not just #GtkButton widgets, but also #GtkToggleButton and
  * #GtkCheckButton widgets, since those classes derive from #GtkButton.
  *
  *   </para></listitem>
  *   <listitem><para>
  *   Merge multiple styles which use the same matching rule, for instance:
- *   <informalexample><programlisting>
+ *   |[
  *      style "Foo" { foo_content }
  *      class "X" style "Foo"
  *      style "Bar" { bar_content }
  *      class "X" style "Bar"
- *   </programlisting></informalexample>
+ *   ]|
  *   is faster to match as:
- *   <informalexample><programlisting>
+ *   |[
  *      style "FooBar" { foo_content bar_content }
  *      class "X" style "FooBar"
- *   </programlisting></informalexample>
+ *   ]|
  *   </para></listitem>
  *   <listitem><para>
  *   Use of wildcards should be avoided, this can reduce the individual RC style
  *
  * Here are some examples of color expressions:
  *
- * <informalexample><programlisting>
+ * |[
  *  mix (0.5, "red", "blue")
  *  shade (1.5, mix (0.3, "#0abbc0", { 0.3, 0.5, 0.9 }))
  *  lighter (@<!-- -->foreground)
- * </programlisting></informalexample>
+ * ]|
  *
  * In a <literal>stock</literal> definition, icon sources are specified as a
  * 4-tuple of image filename or icon name, text direction, widget state, and size, in that
  * <literal>*</literal>. So for example, the following specifies different icons to
  * use for left-to-right and right-to-left languages:
  *
- * <informalexample><programlisting>
+ * |[
  * stock["my-stock-item"] =
  * {
  *   { "itemltr.png", LTR, *, * },
  *   { "itemrtl.png", RTL, *, * }
  * }
- * </programlisting></informalexample>
+ * ]|
  *
  * This could be abbreviated as follows:
  *
- * <informalexample><programlisting>
+ * |[
  * stock["my-stock-item"] =
  * {
  *   { "itemltr.png", LTR },
  *   { "itemrtl.png", RTL }
  * }
- * </programlisting></informalexample>
+ * ]|
  *
  * You can specify custom icons for specific sizes, as follows:
  *
- * <informalexample><programlisting>
+ * |[
  * stock["my-stock-item"] =
  * {
  *   { "itemmenusize.png", *, *, "gtk-menu" },
  *   { "itemtoolbarsize.png", *, *, "gtk-large-toolbar" }
  *   { "itemgeneric.png" } // implicit *, *, * as a fallback
  * }
- * </programlisting></informalexample>
+ * ]|
  *
  * The sizes that come with GTK+ itself are <literal>"gtk-menu"</literal>,
  * <literal>"gtk-small-toolbar"</literal>, <literal>"gtk-large-toolbar"</literal>,
  *
  * It's also possible to use custom icons for a given state, for example:
  *
- * <informalexample><programlisting>
+ * |[
  * stock["my-stock-item"] =
  * {
  *   { "itemprelight.png", *, PRELIGHT },
  *   { "iteminsensitive.png", *, INSENSITIVE },
  *   { "itemgeneric.png" } // implicit *, *, * as a fallback
  * }
- * </programlisting></informalexample>
+ * ]|
  *
  * When selecting an icon source to use, GTK+ will consider text direction most
  * important, state second, and size third. It will select the best match based on
  * taken on particular key presses. The form of a binding
  * set declaration is:
  *
- * <informalexample><programlisting>
+ * |[
  * binding <replaceable>name</replaceable> {
  *   bind <replaceable>key</replaceable> {
  *     <replaceable>signalname</replaceable> (<replaceable>param</replaceable>, ...)
  *   }
  *   ...
  * }
- * </programlisting></informalexample>
+ * ]|
  *
  * <replaceable>key</replaceable> is a string consisting of a
  * series of modifiers followed by the name of a key. The
index 74abf0ac476a0750c0f42fad6c25bb4fe75a814a..1ae5da8343104405c5554d4d17c3cf0be92a6195 100644 (file)
@@ -4067,9 +4067,9 @@ gtk_widget_get_default_style (void)
  * This function attaches the widget's #GtkStyle to the widget's
  * #GdkWindow. It is a replacement for
  *
- * <programlisting>
+ * |[
  * widget->style = gtk_style_attach (widget->style, widget->window);
- * </programlisting>
+ * ]|
  *
  * and should only ever be called in a derived widget's "realize"
  * implementation which does not chain up to its parent class'
index cecb64a6ce3c632e18630675737c42a6e9073a73..55affca845776709123ab319cca88781f94fadbc 100644 (file)
@@ -729,13 +729,13 @@ gtk_table_resize (GtkTable *table,
  * and row numbers of the table. (Columns and rows are indexed from zero).
  *
  * To make a button occupy the lower right cell of a 2x2 table, use
- * <informalexample><programlisting>
+ * |[
  * gtk_table_attach (table, button,
  *                   1, 2, // left, right attach
  *                   1, 2, // top, bottom attach
  *                   xoptions, yoptions,
  *                   xpadding, ypadding);
- * </programlisting></informalexample>
+ * ]|
  * If you want to make the button span the entire bottom row, use @left_attach == 0 and @right_attach = 2 instead.
  *
  * Deprecated: 3.4: Use gtk_grid_attach() with #GtkGrid. Note that the attach
index 4af0b34dcd42a5305a6eafb0aac3bcc9f682b1c1..207d019da9e3a8736ae4b9ace11687e071568fe3 100644 (file)
@@ -72,8 +72,7 @@
  * Definitions</link>.
  * </para></note>
  *
- * <programlisting>
- * <![CDATA[
+ * |[
  * <!ELEMENT ui          (menubar|toolbar|popup|accelerator)* >
  * <!ELEMENT menubar     (menuitem|separator|placeholder|menu)* >
  * <!ELEMENT menu        (menuitem|separator|placeholder|menu)* >
  *                        position     (top|bot)    #IMPLIED >
  * <!ATTLIST accelerator  name                      #IMPLIED
  *                        action                    #REQUIRED >
- * ]]>
- * </programlisting>
+ * ]|
  * There are some additional restrictions beyond those specified in the
  * DTD, e.g. every toolitem must have a toolbar in its anchestry and
  * every menuitem must have a menubar or popup in its anchestry. Since
  *
  * <example>
  * <title>A UI definition</title>
- * <programlisting><![CDATA[
+ * |[
  * <ui>
  *   <menubar>
  *     <menu name="FileMenu" action="FileMenuAction">
  *     </placeholder>
  *   </toolbar>
  * </ui>
- * ]]></programlisting>
+ * ]|
  * </example>
  *
  * The constructed widget hierarchy is very similar to the element tree
  *
  * <example>
  * <title>An embedded GtkUIManager UI definition</title>
- * <programlisting><![CDATA[
+ * |[
  * <object class="GtkUIManager" id="uiman">
  *   <child>
  *     <object class="GtkActionGroup" id="actiongroup">
  *     <object class="GtkMenuBar" id="menubar1" constructor="uiman"/>
  *   </child>
  * </object>
- * ]]></programlisting>
+ * ]|
  * </example>
  * </para>
  * </refsect2>
index dd0f68f8b872bdd516494dbcf2361ff1feaed80f..1348ff9f2c4f1afee8597a47984d9226c1e3c7e5 100644 (file)
  * application, but in order to ensure proper translation of the title,
  * applications should set the title property explicitly when constructing
  * a GtkAboutDialog, as shown in the following example:
- * <informalexample><programlisting>
+ * |[
  * gtk_show_about_dialog (NULL,
  *                        "program-name", "ExampleCode",
  *                        "logo", example_logo,
  *                        "title" _("About ExampleCode"),
  *                        NULL);
- * </programlisting></informalexample>
+ * ]|
  *
  * It is also possible to show a #GtkAboutDialog like any other #GtkDialog,
  * e.g. using gtk_dialog_run(). In this case, you might need to know that
index 13e55403e88840e4477ac3ad198bb1392918e24f..e4c9c2fd3a567fd7a6574c3a30017d23613a2774 100644 (file)
@@ -67,7 +67,7 @@
  * though it is almost always used to display just one accelerator key.
  * <example>
  * <title>Creating a simple menu item with an accelerator key.</title>
- * <programlisting>
+ * |[
  *   GtkWidget *save_item;
  *   GtkAccelGroup *accel_group;
  *
@@ -86,7 +86,7 @@
  *      accelerators. We just need to make sure we use GTK_ACCEL_VISIBLE here. *<!---->/
  *   gtk_widget_add_accelerator (save_item, "activate", accel_group,
  *                               GDK_KEY_s, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);
- * </programlisting>
+ * ]|
  * </example>
  */
 
index 2b5e0a5c9515239ad780c6ebb86d8719296aaca7..38163ed8f6124e3dc56b2dabf089c19ee99d527c 100644 (file)
  * </figure>
  *
  * <example id="gtkapplication"><title>A simple application</title>
- * <programlisting>
+ * |[
  * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../examples/bloatpad.c">
  *  <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
  * </xi:include>
- * </programlisting>
+ * ]|
  * </example>
  *
  * GtkApplication optionally registers with a session manager
index 93f126749e4607f7a0ddd5793d3ad56ef02a6aa7..3396de208eaf64bd6b3bda39cb4923608736c303 100644 (file)
@@ -79,7 +79,7 @@
  * using gtk_header_bar_set_show_close_button().
  *
  * <example><title>A GtkApplicationWindow with a menubar</title>
- * <programlisting><![CDATA[
+ * |[
  * app = gtk_application_new ();
  *
  * builder = gtk_builder_new ();
  * ...
  *
  * window = gtk_application_window_new (app);
- * ]]>
- * </programlisting>
+ * ]|
  * </example>
  *
  * <example><title>Handling fallback yourself</title>
- * <programlisting>
+ * |[
  * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../examples/sunny.c">
  *  <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
  * </xi:include>
- * </programlisting>
+ * ]|
  * </example>
  *
  * The XML format understood by #GtkBuilder for #GMenuModel consists
index a64c132204e130dc5153404618cb2575d9563753..5cf894c5f70443a1a5816ffe1d9f015baa3d5c62 100644 (file)
@@ -68,7 +68,7 @@
  * For example for binding Control and the left or right cursor keys
  * of a #GtkEntry widget to the #GtkEntry::move-cursor signal (so movement
  * occurs in 3-character steps), the following binding can be used:
- * <informalexample><programlisting>
+ * |[
  * @binding-set MoveCursor3
  * {
  *   bind "&lt;Control&gt;Right" { "move-cursor" (visual-positions, 3, 0) };
@@ -78,7 +78,7 @@
  * {
  *   gtk-key-bindings: MoveCursor3;
  * }
- * </programlisting></informalexample>
+ * ]|
  * </para>
  * </refsect2>
  * <refsect2 id="gtk-bindings-unbind">
@@ -91,7 +91,7 @@
  * <link linkend="gtk-bindings-install">Installing a key binding</link>
  * works as expected. The same mechanism can not be used to "unbind"
  * existing bindings, however.
- * <informalexample><programlisting>
+ * |[
  * @binding-set MoveCursor3
  * {
  *   bind "&lt;Control&gt;Right" {  };
  * {
  *   gtk-key-bindings: MoveCursor3;
  * }
- * </programlisting></informalexample>
+ * ]|
  * The above example will not have the desired effect of causing
  * "&lt;Control&gt;Right" and "&lt;Control&gt;Left" key presses to
  * be ignored by GTK+. Instead, it just causes any existing bindings
  * eventually lookup and find the default GTK+ bindings for entries which
  * implement word movement. To keep GTK+ from activating its default
  * bindings, the "unbind" keyword can be used like this:
- * <informalexample><programlisting>
+ * |[
  * @binding-set MoveCursor3
  * {
  *   unbind "&lt;Control&gt;Right";
  * {
  *   gtk-key-bindings: MoveCursor3;
  * }
- * </programlisting></informalexample>
+ * ]|
  * Now, GTK+ will find a match when looking up "&lt;Control&gt;Right"
  * and "&lt;Control&gt;Left" key presses before it resorts to its default
  * bindings, and the match instructs it to abort ("unbind") the search,
@@ -1357,17 +1357,17 @@ create_signal_scanner (void)
  *
  * Signal descriptions may either bind a key combination to
  * one or more signals:
- * <informalexample><programlisting>
+ * |[
  *   bind "key" {
  *     "signalname" (param, ...)
  *     ...
  *   }
- * </programlisting></informalexample>
+ * ]|
  *
  * Or they may also unbind a key combination:
- * <informalexample><programlisting>
+ * |[
  *   unbind "key"
- * </programlisting></informalexample>
+ * ]|
  *
  * Key combinations must be in a format that can be parsed by
  * gtk_accelerator_parse().
index 81b8413cf211c0518cbe51698008514c6fcf9c37..f53f2103fc7a6e638d0ecbe95ed97eabd23ca068 100644 (file)
  * <link linkend="XML-UI">GtkUIManager UI Definitions</link>, which are more
  * limited in scope. It is common to use <filename>.ui</filename> as the filename extension for files containing GtkBuilder UI definitions.
  * </para>
- * <programlisting>
+ * |[
  * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../gtk/gtkbuilder.rnc">
  *   <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
  * </xi:include>
- * </programlisting>
+ * ]|
  * <para>
  * The toplevel element is &lt;interface&gt;. It optionally takes a "domain"
  * attribute, which will make the builder look for translated strings using
  * </para>
  * <example>
  * <title>A GtkBuilder UI Definition</title>
- * <programlisting><![CDATA[
+ * |[
  * <interface>
  *   <object class="GtkDialog" id="dialog1">
  *     <child internal-child="vbox">
  *     </child>
  *   </object>
  * </interface>
- * ]]></programlisting>
+ * ]|
  * </example>
  * <para>
  * Beyond this general structure, several object classes define their own XML
index 1365e65a6329898df637d68b6bd6213d0880ddbf..583072fd666e095782fc37de636c01ca9399f5c1 100644 (file)
@@ -74,7 +74,7 @@
  * of a #GtkTreeModel one would do the following:
  * <example>
  *   <title>Requesting the width of a handful of GtkTreeModel rows</title>
- *   <programlisting>
+ *   |[
  * GtkTreeIter iter;
  * gint        minimum_width;
  * gint        natural_width;
@@ -88,7 +88,7 @@
  *     valid = gtk_tree_model_iter_next (model, &iter);
  *   }
  * gtk_cell_area_context_get_preferred_width (context, &minimum_width, &natural_width);
- *   </programlisting>
+ *   ]|
  * </example>
  * Note that in this example it's not important to observe the
  * returned minimum and natural width of the area for each row
  * take up the full width of the layouting widget would look like:
  * <example>
  *   <title>A typical get_preferred_width(<!-- -->) implementation</title>
- *   <programlisting>
+ *   |[
  * static void
  * foo_get_preferred_width (GtkWidget       *widget,
  *                          gint            *minimum_size,
  *
  *   gtk_cell_area_context_get_preferred_width (priv->context, minimum_size, natural_size);
  * }
- *   </programlisting>
+ *   ]|
  * </example>
  * In the above example the Foo widget has to make sure that some
  * row sizes have been calculated (the amount of rows that Foo judged
  * root level of a #GtkTreeModel one would do the following:
  * <example>
  *   <title>Requesting the height for width of a handful of GtkTreeModel rows</title>
- *   <programlisting>
+ *   |[
  * GtkTreeIter iter;
  * gint        minimum_height;
  * gint        natural_height;
  *
  *     valid = gtk_tree_model_iter_next (model, &iter);
  *   }
- *   </programlisting>
+ *   ]|
  * </example>
  * Note that in the above example we would need to cache the heights
  * returned for each row so that we would know what sizes to render the
  * runs as follows:
  * <example>
  *   <title>Requesting the width of a handful of GtkTreeModel rows</title>
- *   <programlisting>
+ *   |[
  * GtkAllocation allocation;
  * GdkRectangle  cell_area = { 0, };
  * GtkTreeIter   iter;
  *
  *     valid = gtk_tree_model_iter_next (model, &iter);
  *   }
- *   </programlisting>
+ *   ]|
  * </example>
  * Note that the cached height in this example really depends on how
  * the layouting widget works. The layouting widget might decide to
  * should be implemented:
  * <example>
  *   <title>Implementing keyboard focus navigation</title>
- *   <programlisting>
+ *   |[
  * static gboolean
  * foo_focus (GtkWidget       *widget,
  *            GtkDirectionType direction)
  *     }
  *     return have_focus;
  * }
- *   </programlisting>
+ *   ]|
  * </example>
  * Note that the layouting widget is responsible for matching the
  * GtkDirectionType values to the way it lays out its cells.
index 41d9e2eb4161ad4238cd9aae6f80f7f24c75179d..36958b235a2fd18d66a65b8b4038179929e3e533 100644 (file)
@@ -48,7 +48,7 @@
  *
  * <example>
  * <title>A UI definition fragment specifying attributes</title>
- * <programlisting><![CDATA[
+ * |[
  * <object class="GtkCellView">
  *   <child>
  *     <object class="GtkCellRendererText"/>
@@ -57,7 +57,7 @@
  *     </attributes>
  *   </child>"
  * </object>
- * ]]></programlisting>
+ * ]|
  * </example>
  *
  * Furthermore for implementations of GtkCellLayout that use a #GtkCellArea
@@ -67,7 +67,7 @@
  * can contain multiple &lt;property&gt; elements defined in the normal way.
  * <example>
  * <title>A UI definition fragment specifying cell properties</title>
- * <programlisting><![CDATA[
+ * |[
  * <object class="GtkTreeViewColumn">
  *   <child>
  *     <object class="GtkCellRendererText"/>
@@ -77,7 +77,7 @@
  *     </cell-packing>
  *   </child>"
  * </object>
- * ]]></programlisting>
+ * ]|
  * </example>
  * </para>
  * </refsect2>
@@ -90,9 +90,9 @@
  * to the fact that these widgets internally use a #GtkCellArea.
  * The cell area is exposed as a construct-only property by these
  * widgets. This means that it is possible to e.g. do
- * <informalexample><programlisting>
+ * |[
  * combo = g_object_new (GTK_TYPE_COMBO_BOX, "cell-area", my_cell_area, NULL);
- * </programlisting></informalexample>
+ * ]|
  * to use a custom cell area with a combo box. But construct properties
  * are only initialized after instance init()
  * functions have run, which means that using functions which rely on
  * cause the default cell area to be instantiated. In this case, a provided
  * construct property value will be ignored (with a warning, to alert
  * you to the problem).
- * <informalexample><programlisting>
+ * |[
  * static void
  * my_combo_box_init (MyComboBox *b)
  * {
  *    &ast;/
  *   return g_object_new (MY_TYPE_COMBO_BOX, "cell-area", area, NULL);
  * }
- * </programlisting></informalexample>
+ * ]|
  * If supporting alternative cell areas with your derived widget is
  * not important, then this does not have to concern you. If you want
  * to support alternative cell areas, you can do so by moving the
index 0de9124b07e1bc6b2473fe8db0a36bcbb1c5a8a1..80325b64c3bf9d7f2b19cb8e3ead0a1ab7ada70b 100644 (file)
@@ -64,7 +64,7 @@
  *
  * <example>
  * <title>A UI definition fragment specifying GtkComboBoxText items</title>
- * <programlisting><![CDATA[
+ * |[
  * <object class="GtkComboBoxText">
  *   <items>
  *     <item translatable="yes" id="factory">Factory</item>
@@ -72,7 +72,7 @@
  *     <item translatable="yes" id="subway">Subway</item>
  *   </items>
  * </object>
- * ]]></programlisting>
+ * ]|
  * </example>
  * </para>
  * </refsect2>
index ae759e9ed1e5041d69d5f562de33f80dc13afe5e..de42b916f70bd0abf4d3f201325e7f4156df2c40 100644 (file)
  * the container must return the height for its minimum width. This is easily achieved by
  * simply calling the reverse apis implemented for itself as follows:
  *
- * <programlisting><![CDATA[
+ * |[
  * static void
  * foo_container_get_preferred_height (GtkWidget *widget, gint *min_height, gint *nat_height)
  * {
  *        stacked vertically (or whatever is appropriate for this container) ...
  *      }
  * }
- * ]]></programlisting>
+ * ]|
  *
  * Similarly, when gtk_widget_get_preferred_width_for_height() is called for a container or widget
  * that is height-for-width, it then only needs to return the base minimum width like so:
  *
- * <programlisting><![CDATA[
+ * |[
  * static void
  * foo_container_get_preferred_width_for_height (GtkWidget *widget, gint for_height,
  *                                               gint *min_width, gint *nat_width)
  *        of the children collectively if the container were to be allocated the said height ...
  *      }
  * }
- * ]]></programlisting>
+ * ]|
  *
  * Height for width requests are generally implemented in terms of a virtual allocation
  * of widgets in the input orientation. Assuming an height-for-width request mode, a container
  * child properties for the child.
  * <example>
  * <title>Child properties in UI definitions</title>
- * <programlisting><![CDATA[
+ * |[
  * <object class="GtkVBox">
  *   <child>
  *     <object class="GtkLabel"/>
  *     </packing>
  *   </child>
  * </object>
- * ]]></programlisting>
+ * ]|
  * </example>
  * Since 2.16, child properties can also be marked as translatable using
  * the same "translatable", "comments" and "context" attributes that are used
index 4c0437983ff59fdfcf54e2170c208700a903e284..95efdd6795b0d648e96a9de39ba32a81d0c631aa 100644 (file)
@@ -202,12 +202,12 @@ gtk_css_custom_property_create_initial_value (GParamSpec *pspec)
  * the CSS file, make sure the engine is loaded first by specifying
  * the engine property, either in a previous rule or within the same
  * one.
- * <programlisting>
+ * |[
  * &ast; {
  *     engine: someengine;
  *     -SomeEngine-custom-property: 2;
  * }
- * </programlisting>
+ * ]|
  * </note>
  *
  * Since: 3.0
index f457b92086f7abdbba99b48ab17b170ea5768cd2..4f388ab4077535a2ed4e51020faa2d39c2f79a74 100644 (file)
  * front of the block, separated by commas.
  * </para>
  * <example><title>A rule set with two selectors</title>
- * <programlisting language="text">
+ * |[
  * GtkButton, GtkEntry {
  *     color: &num;ff00ea;
  *     font: Comic Sans 12
  * }
- * </programlisting>
+ * ]|
  * </example>
  * </refsect2>
  * <refsect2 id="gtkcssprovider-selectors">
  * </para>
  * <example>
  * <title>Widget classes and names in selectors</title>
- * <programlisting language="text">
+ * |[
  * /&ast; Theme labels that are descendants of a window &ast;/
  * GtkWindow GtkLabel {
  *     background-color: &num;898989
  * &num;main-entry {
  *     background-color: &num;f0a810
  * }
- * </programlisting>
+ * ]|
  * </example>
  * <para>
  * Widgets may also define style classes, which can be used for matching.
  * </para>
  * <example>
  * <title>Style classes in selectors</title>
- * <programlisting language="text">
+ * |[
  * /&ast; Theme all widgets defining the class entry &ast;/
  * .entry {
  *     color: &num;39f1f9;
  * GtkSpinButton.entry {
  *     color: &num;900185
  * }
- * </programlisting>
+ * ]|
  * </example>
  * <para>
  * In complicated widgets like e.g. a GtkNotebook, it may be desirable
  * </para>
  * <example>
  * <title>Regions in selectors</title>
- * <programlisting language="text">
+ * |[
  * /&ast; Theme any label within a notebook &ast;/
  * GtkNotebook GtkLabel {
  *     color: &num;f90192;
  * GtkNotebook tab:first-child GtkLabel {
  *     color: &num;89d012;
  * }
- * </programlisting>
+ * ]|
  * </example>
  * <para>
  * Another use of pseudo-classes is to match widgets depending on their
  * </para>
  * <example>
  * <title>Styling specific widget states</title>
- * <programlisting language="text">
+ * |[
  * /&ast; Theme active (pressed) buttons &ast;/
  * GtkButton:active {
  *     background-color: &num;0274d9;
  * GtkCheckButton:inconsistent {
  *     background-color: &num;20395a;
  * }
- * </programlisting>
+ * ]|
  * </example>
  * <para>
  * Widget state pseudoclasses may only apply to the last element
  * </para>
  * <example>
  * <title>Using the &commat;import rule</title>
- * <programlisting language="text">
+ * |[
  * &commat;import url ("path/to/common.css");
- * </programlisting>
+ * ]|
  * </example>
  * <para id="css-binding-set">
  * In order to extend key bindings affecting different widgets, GTK+
  * </para>
  * <example>
  * <title>Using the &commat;binding rule</title>
- * <programlisting language="text">
+ * |[
  * &commat;binding-set binding-set1 {
  *   bind "&lt;alt&gt;Left" { "move-cursor" (visual-positions, -3, 0) };
  *   unbind "End";
  * GtkEntry {
  *   gtk-key-bindings: binding-set1, binding-set2;
  * }
- * </programlisting>
+ * ]|
  * </example>
  * <para>
  * GTK+ also supports an additional &commat;define-color rule, in order
  * </para>
  * <example>
  * <title>Defining colors</title>
- * <programlisting language="text">
+ * |[
  * &commat;define-color bg_color &num;f9a039;
  *
  * &ast; {
  *     background-color: &commat;bg_color;
  * }
- * </programlisting>
+ * ]|
  * </example>
  * </refsect2>
  * <refsect2 id="gtkcssprovider-symbolic-colors">
  * </para>
  * <example>
  * <title>Using symbolic colors</title>
- * <programlisting language="text">
+ * |[
  * &commat;define-color entry-color shade (&commat;bg_color, 0.7);
  *
  * GtkEntry {
  *                            shade (&num;fff, 0.5),
  *                            0.8);
  * }
- * </programlisting>
+ * ]|
  * </example>
  * <para>
  *   The various ways to express colors in GTK+ CSS are:
  * </para>
  * <example>
  * <title>Using engine-specific style properties</title>
- * <programlisting>
+ * |[
  * * {
  *     engine: clearlooks;
  *     border-radius: 4;
  *     -GtkPaned-handle-size: 6;
  *     -clearlooks-colorize-scrollbar: false;
  * }
- * </programlisting>
+ * ]|
  * </example>
  * </refsect2>
  */
index 2e7b6077a775d90deeeee581a83d3a0e1c255226..ad9a37818cd9bd55f73344a882685e90ec2f835a 100644 (file)
@@ -98,7 +98,7 @@
  * in the dialog.
  * <example>
  * <title>Simple GtkDialog usage</title>
- * <programlisting>
+ * |[
  * /&ast; Function to open a dialog box displaying the message provided. &ast;/
  * void
  * quick_message (gchar *message)
  *    gtk_container_add (GTK_CONTAINER (content_area), label);
  *    gtk_widget_show_all (dialog);
  * }
- * </programlisting>
+ * ]|
  * </example>
  *
  * <refsect2 id="GtkDialog-BUILDER-UI"><title>GtkDialog as GtkBuildable</title>
  * </para>
  * <example>
  * <title>A #GtkDialog UI definition fragment.</title>
- * <programlisting><![CDATA[
+ * |[
  * <object class="GtkDialog" id="dialog1">
  *   <child internal-child="vbox">
  *     <object class="GtkVBox" id="vbox">
  *     <action-widget response="cancel">button_cancel</action-widget>
  *   </action-widgets>
  * </object>
- * ]]></programlisting>
+ * ]|
  * </example>
  * </refsect2>
  */
index 9fa60e475a762ef324a2a466cd346517b87a4a5f..e5375bcb2c392b63982efe2953d57bd06559c3c3 100644 (file)
@@ -77,7 +77,7 @@
  *
  * <example>
  * <title>Simple GtkDrawingArea usage</title>
- * <programlisting>
+ * |[
  * gboolean
  * draw_callback (GtkWidget *widget, cairo_t *cr, gpointer data)
  * {
  *   gtk_widget_set_size_request (drawing_area, 100, 100);
  *   g_signal_connect (G_OBJECT (drawing_area), "draw",
  *                     G_CALLBACK (draw_callback), NULL);
- * </programlisting>
+ * ]|
  * </example>
  *
  * Draw signals are normally delivered when a drawing area first comes
index 93c83d1bf0e71364ff0c9ce26b53d480f1056623..9c41402320141a4636cfe72afe29d4d8d79f01ac 100644 (file)
@@ -39,7 +39,7 @@
  *
  * <example>
  * <title>Forcing entry to uppercase.</title>
- * <programlisting>
+ * |[
  * #include &lt;ctype.h&gt;
  *
  * void
@@ -61,7 +61,7 @@
  *
  *   g_free (result);
  * }
- * </programlisting>
+ * ]|
  * </example>
  */
 
index 76cc7288d8ea55690ac9fa3da162ecb1e74bf258..ae18dedd5d52713ca525c44b3605191438e50bc3 100644 (file)
@@ -7709,9 +7709,9 @@ gtk_entry_get_overwrite_mode (GtkEntry *entry)
  *
  * This is equivalent to:
  *
- * <informalexample><programlisting>
+ * |[
  * gtk_entry_buffer_get_text (gtk_entry_get_buffer (entry));
- * </programlisting></informalexample>
+ * ]|
  *
  * Return value: a pointer to the contents of the widget as a
  *      string. This string points to internally allocated
@@ -7739,9 +7739,9 @@ gtk_entry_get_text (GtkEntry *entry)
  *
  * This is equivalent to:
  *
- * <informalexample><programlisting>
+ * |[
  * gtk_entry_buffer_set_max_length (gtk_entry_get_buffer (entry), max);
- * </programlisting></informalexample>
+ * ]|
  **/
 void
 gtk_entry_set_max_length (GtkEntry     *entry,
@@ -7760,9 +7760,9 @@ gtk_entry_set_max_length (GtkEntry     *entry,
  *
  * This is equivalent to:
  *
- * <informalexample><programlisting>
+ * |[
  * gtk_entry_buffer_get_max_length (gtk_entry_get_buffer (entry));
- * </programlisting></informalexample>
+ * ]|
  *
  * Return value: the maximum allowed number of characters
  *               in #GtkEntry, or 0 if there is no maximum.
@@ -7784,9 +7784,9 @@ gtk_entry_get_max_length (GtkEntry *entry)
  *
  * This is equivalent to:
  *
- * <informalexample><programlisting>
+ * |[
  * gtk_entry_buffer_get_length (gtk_entry_get_buffer (entry));
- * </programlisting></informalexample>
+ * ]|
  *
  * Return value: the current number of characters
  *               in #GtkEntry, or 0 if there are none.
index a9d728e30b2cdcac7b3afe248087c203ec3daa6f..6667fb9ed6ee528d0d06dddabac6e551bb80d0b3 100644 (file)
@@ -43,8 +43,7 @@
  * its expansion state. You should watch this property with a signal
  * connection as follows:
  * </para>
- * <informalexample>
- * <programlisting id="expander-callback-example">
+ * |[
  * expander = gtk_expander_new_with_mnemonic ("_More Options");
  * g_signal_connect (expander, "notify::expanded",
  *                   G_CALLBACK (expander_callback), NULL);
@@ -69,8 +68,7 @@
  *       /&ast; Hide or destroy widgets &ast;/
  *     }
  * }
- * </programlisting>
- * </informalexample>
+ * ]|
  * </refsect2>
  * <refsect2 id="GtkExpander-BUILDER-UI">
  * <title>GtkExpander as GtkBuildable</title>
@@ -83,7 +81,7 @@
  * </para>
  * <example>
  * <title>A UI definition fragment with GtkExpander</title>
- * <programlisting><![CDATA[
+ * |[
  * <object class="GtkExpander">
  *   <child type="label">
  *     <object class="GtkLabel" id="expander-label"/>
@@ -92,7 +90,7 @@
  *     <object class="GtkEntry" id="expander-content"/>
  *   </child>
  * </object>
- * ]]></programlisting>
+ * ]|
  * </example>
  * </refsect2>
  *
index ad2dbe443373135dec8166aacd168e59e5d1b155..6619e78a76286d5a585d50f325a183e0a95ae158 100644 (file)
  * </para>
  * <example id="example-gtkfilechooser-preview">
  * <title>Sample Usage</title>
- * <programlisting>
+ * |[
  * {
  *   GtkImage *preview;
  *
  *
  *   gtk_file_chooser_set_preview_widget_active (file_chooser, have_preview);
  * }
- * </programlisting>
+ * ]|
  * </example>
  * </refsect2>
  * <refsect2 id="gtkfilechooser-extra">
  * </para>
  * <example id="example-gtkfilechooser-extra">
  * <title>Sample Usage</title>
- * <programlisting>
+ * |[
  *
  *   GtkWidget *toggle;
  *
  *   gtk_widget_show (toggle);
  *   gtk_file_chooser_set_extra_widget (my_file_chooser, toggle);
  * }
- * </programlisting>
+ * ]|
  * </example>
  * <note>
  *    If you want to set more than one extra widget in the file
@@ -347,7 +347,7 @@ gtk_file_chooser_default_init (GtkFileChooserInterface *iface)
    * illustrates this.
    * <example id="gtkfilechooser-confirmation">
    * <title>Custom confirmation</title>
-   * <programlisting>
+   * |[
    * static GtkFileChooserConfirmation
    * confirm_overwrite_callback (GtkFileChooser *chooser, gpointer data)
    * {
@@ -377,7 +377,7 @@ gtk_file_chooser_default_init (GtkFileChooserInterface *iface)
    *         save_to_file (gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (chooser));
    *
    * gtk_widget_destroy (chooser);
-   * </programlisting>
+   * ]|
    * </example>
    *
    * Returns: a #GtkFileChooserConfirmation value that indicates which
index 2fadbdd48bd295282ce2a3aa05b3a0c5d029784e..b92262c418cd8a47bacb08362a3be693d5e35d46 100644 (file)
@@ -72,7 +72,7 @@
  *
  * <example>
  * <title>Create a button to let the user select a file in /etc</title>
- * <programlisting>
+ * |[
  * {
  *   GtkWidget *button;
  *
@@ -81,7 +81,7 @@
  *   gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (button),
  *                                        "/etc");
  * }
- * </programlisting>
+ * ]|
  * </example>
  *
  * The #GtkFileChooserButton supports the #GtkFileChooserAction<!-- -->s
index 74e9c433a31e6ad71419f36ab57c534ffb88f255..1ae2574cebdf18d6152789675398b86e839921f4 100644 (file)
@@ -57,7 +57,7 @@
  * In the simplest of cases, you can the following code to use
  * #GtkFileChooserDialog to select a file for opening:
  * <para>
- * <informalexample><programlisting>
+ * |[
  * GtkWidget *dialog;
  *
  * dialog = gtk_file_chooser_dialog_new ("Open File",
  *   }
  *
  * gtk_widget_destroy (dialog);
- * </programlisting></informalexample>
+ * ]|
  * </para>
  * To use a dialog for saving, you can use this:
  * <para>
- * <informalexample><programlisting>
+ * |[
  * GtkWidget *dialog;
  *
  * dialog = gtk_file_chooser_dialog_new ("Save File",
  *   }
  *
  * gtk_widget_destroy (dialog);
- * </programlisting></informalexample>
+ * ]|
  * </para>
  * </example>
  * <section id="gtkfilechooserdialog-setting-up">
  * #GTK_RESPONSE_ACCEPT and #GTK_RESPONSE_CANCEL.  For example, you
  * could call gtk_file_chooser_dialog_new() as follows:
  * <para>
- * <informalexample><programlisting>
+ * |[
  * GtkWidget *dialog;
  *
  * dialog = gtk_file_chooser_dialog_new ("Open File",
  *                                       _("_Cancel"), GTK_RESPONSE_CANCEL,
  *                                       _("_Open"), GTK_RESPONSE_ACCEPT,
  *                                       NULL);
- * </programlisting></informalexample>
+ * ]|
  * </para>
  * This will create buttons for "Cancel" and "Open" that use stock
  * response identifiers from #GtkResponseType.  For most dialog
index f314bcd0052814a1130a4ceffa0d57bed36c5c4c..03d1f564b9e936b53ab042d2c1a5d62abd1524a8 100644 (file)
@@ -49,7 +49,7 @@
  *
  * <example>
  * <title>A UI definition fragment specifying GtkFileFilter rules</title>
- * <programlisting><![CDATA[
+ * |[
  * <object class="GtkFileFilter">
  *   <mime-types>
  *     <mime-type>text/plain</mime-type>
@@ -60,7 +60,7 @@
  *     <pattern>*.png</pattern>
  *   </patterns>
  * </object>
- * ]]></programlisting>
+ * ]|
  * </example>
  * </para>
  * </refsect2>
index b4b5dd23418d962c1300c5cd58df871579168c76..3e302c32a5ebb3f294ee50b3f99b2e4dc8f21444 100644 (file)
@@ -56,7 +56,7 @@
  * </para>
  * <example>
  * <title>A UI definition fragment with GtkFrame</title>
- * <programlisting><![CDATA[
+ * |[
  * <object class="GtkFrame">
  *   <child type="label">
  *     <object class="GtkLabel" id="frame-label"/>
@@ -65,7 +65,7 @@
  *     <object class="GtkEntry" id="frame-content"/>
  *   </child>
  * </object>
- * ]]></programlisting>
+ * ]|
  * </example>
  * </refsect2>
  */
index 4b0c4c7d8713e01f15369edc6bf46b89bb02e1b3..2e8ac6f167475fa685368c68bf9c5d8824b290fd 100644 (file)
  * so that the icon information is shared with other people
  * looking up icons. In the case where the default screen is
  * being used, looking up an icon can be as simple as:
- * <informalexample>
- * <programlisting>
+ * |[
  * GError *error = NULL;
  * GtkIconTheme *icon_theme;
  * GdkPixbuf *pixbuf;
  *     // Use the pixbuf
  *     g_object_unref (pixbuf);
  *   }
- * </programlisting>
- * </informalexample>
+ * ]|
  */
 
 
index 4eead137cdf38558ee4917360b3d5ecc7cca42d2..fdd859e5dc10045ed9d26ec91affedd461f24738 100644 (file)
  * #GdkPixbuf ("pixel buffer") from a file, and then display that.
  * There's a convenience function to do this, gtk_image_new_from_file(),
  * used as follows:
- * <informalexample><programlisting>
+ * |[
  *   GtkWidget *image;
  *   image = gtk_image_new_from_file ("myfile.png");
- * </programlisting></informalexample>
+ * ]|
  * If the file isn't loaded successfully, the image will contain a
  * "broken image" icon similar to that used in many web browsers.
  * If you want to handle errors in loading the file yourself,
@@ -76,7 +76,7 @@
  * #GtkEventBox, then connect to the event signals on the event box.
  * <example>
  * <title>Handling button press events on a #GtkImage.</title>
- * <programlisting>
+ * |[
  *   static gboolean
  *   button_press_callback (GtkWidget      *event_box,
  *                          GdkEventButton *event,
  *
  *     return image;
  *   }
- * </programlisting>
+ * ]|
  * </example>
  *
  * When handling events on the event box, keep in mind that coordinates
index 37790b58cff05a2e8ef33f2769cc3e50efdf1184..f44a00a3221cdf39c8b1a8849ef579c2db6b0cc6 100644 (file)
  * implements a subclass of #GtkIMContext or #GtkIMContextSimple and exports
  * these four functions:
  *
- * <informalexample><programlisting>
+ * |[
  * void im_module_init(#GTypeModule *module);
- * </programlisting></informalexample>
+ * ]|
  * This function should register the #GType of the #GtkIMContext subclass which
  * implements the input method by means of g_type_module_register_type(). Note
  * that g_type_register_static() cannot be used as the type needs to be
  * registered dynamically.
  *
- * <informalexample><programlisting>
+ * |[
  * void im_module_exit(void);
- * </programlisting></informalexample>
+ * ]|
  * Here goes any cleanup code your input method might require on module unload.
  *
- * <informalexample><programlisting>
+ * |[
  * void im_module_list(const #GtkIMContextInfo ***contexts, int *n_contexts)
  * {
  *   *contexts = info_list;
  *   *n_contexts = G_N_ELEMENTS (info_list);
  * }
- * </programlisting></informalexample>
+ * ]|
  * This function returns the list of input methods provided by the module. The
  * example implementation above shows a common solution and simply returns a
  * pointer to statically defined array of #GtkIMContextInfo items for each
  * provided input method.
  *
- * <informalexample><programlisting>
+ * |[
  * #GtkIMContext * im_module_create(const #gchar *context_id);
- * </programlisting></informalexample>
+ * ]|
  * This function should return a pointer to a newly created instance of the
  * #GtkIMContext subclass identified by @context_id. The context ID is the same
  * as specified in the #GtkIMContextInfo array returned by im_module_list().
index a85412d6f2bb26e88966a59768a361afec527a07..ef3ed805a7af358344562c9464c55f6850af9a31 100644 (file)
@@ -74,7 +74,7 @@
  *
  * <example>
  * <title>Simple GtkInfoBar usage.</title>
- * <programlisting>
+ * |[
  * /&ast; set up info bar &ast;/
  * info_bar = gtk_info_bar_new ();
  * gtk_widget_set_no_show_all (info_bar, TRUE);
@@ -97,7 +97,7 @@
  * gtk_info_bar_set_message_type (GTK_INFO_BAR (info_bar),
  *                                GTK_MESSAGE_ERROR);
  * gtk_widget_show (info_bar);
- * </programlisting>
+ * ]|
  * </example>
  *
  * <refsect2 id="GtkInfoBar-BUILDER-UI">
index 4bc713142ccd5e2c4c52998a8722740bf003dee4..b43636b802c09e092cb3dcd2815ce68f1f23dc94 100644 (file)
  *
  * <example>
  * <title>A UI definition fragment specifying Pango attributes</title>
- * <programlisting><![CDATA[
+ * |[
  * <object class="GtkLabel">
  *   <attributes>
  *     <attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
  *     <attribute name="background" value="red" start="5" end="10"/>"
  *   </attributes>
  * </object>
- * ]]></programlisting>
+ * ]|
  * </example>
  * The start and end attributes specify the range of characters to which the
  * Pango attribute applies. If start and end are not specified, the attribute is
  * using gtk_label_set_mnemonic_widget(). Here's a simple example where
  * the label is inside a button:
  *
- * <informalexample>
- * <programlisting>
+ * |[
  *   // Pressing Alt+H will activate this button
  *   button = gtk_button_new (<!-- -->);
  *   label = gtk_label_new_with_mnemonic ("_Hello");
  *   gtk_container_add (GTK_CONTAINER (button), label);
- * </programlisting>
- * </informalexample>
+ * ]|
  *
  * There's a convenience function to create buttons with a mnemonic label
  * already inside:
  *
- * <informalexample>
- * <programlisting>
+ * |[
  *   // Pressing Alt+H will activate this button
  *   button = gtk_button_new_with_mnemonic ("_Hello");
- * </programlisting>
- * </informalexample>
+ * ]|
  *
  * To create a mnemonic for a widget alongside the label, such as a
  * #GtkEntry, you have to point the label at the entry with
  * gtk_label_set_mnemonic_widget():
  *
- * <informalexample>
- * <programlisting>
+ * |[
  *   // Pressing Alt+H will focus the entry
  *   entry = gtk_entry_new (<!-- -->);
  *   label = gtk_label_new_with_mnemonic ("_Hello");
  *   gtk_label_set_mnemonic_widget (GTK_LABEL (label), entry);
- * </programlisting>
- * </informalexample>
+ * ]|
  * </para>
  * </refsect2>
  * <refsect2>
  * linkend="PangoMarkupFormat">markup format</link>.
  * Here's how to create a label with a small font:
  *
- * <informalexample>
- * <programlisting>
+ * |[
  *   label = gtk_label_new (NULL);
  *   gtk_label_set_markup (GTK_LABEL (label), "<small>Small text</small>");
- * </programlisting>
- * </informalexample>
+ * ]|
  *
  * (See <link
  * linkend="PangoMarkupFormat">complete documentation</link> of available
  * way they appear in web browsers, with colored, underlined text. The title
  * attribute is displayed as a tooltip on the link. An example looks like this:
  *
- * <informalexample><programlisting>
+ * |[
  * gtk_label_set_markup (label, "Go to the <a href="http://www.gtk.org" title="&lt;i&gt;Our&lt;/i&gt; website">GTK+ website</a> for more...");
- * </programlisting></informalexample>
+ * ]|
  *
  * It is possible to implement custom handling for links and their tooltips with
  * the #GtkLabel::activate-link signal and the gtk_label_get_current_uri() function.
index 015611750a30111eac192451d37ed2d2b848e59d..83f913cdcfe6fb6d94cc7456aa3219beb860b246 100644 (file)
@@ -35,7 +35,7 @@
  *
  * <example>
  * <title>Adding a custom offset on the bar</title>
- * <programlisting>
+ * |[
  *
  * static GtkWidget *
  * create_level_bar (void)
@@ -65,7 +65,7 @@
  *
  *   return level_bar;
  * }
- * </programlisting>
+ * ]|
  * </example>
  *
  * The default interval of values is between zero and one, but it's possible to
index 603616408405ea262c97a8a866c54ac0ec40877e..c0a5ec28030cfcaf93f6af5281455c158e6cb6d4 100644 (file)
@@ -55,7 +55,7 @@
  *
  * <example>
  * <title>Creating a simple list store.</title>
- * <programlisting>
+ * |[
  * enum {
  *   COLUMN_STRING,
  *   COLUMN_INT,
  *                       COLUMN_BOOLEAN, TRUE,
  *                       -1);
  * }
- * </programlisting>
+ * ]|
  * </example>
  *
  * <refsect2>
  *
  * <example>
  * <title>A UI Definition fragment for a list store</title>
- * <programlisting><![CDATA[
+ * |[
  * <object class="GtkListStore">
  *   <columns>
  *     <column type="gchararray"/>
  *     </row>
  *   </data>
  * </object>
- * ]]></programlisting>
+ * ]|
  * </example>
  * </para>
  * </refsect2>
index 0c32f13b2333eb40f62b33568b309ea68269be8e..c1205444c28f11a77cd7e1cd75291328c882bb0c 100644 (file)
@@ -55,7 +55,7 @@
  * </para>
  * <example>
  * <title>Typical main() function for a GTK+ application</title>
- * <programlisting>
+ * |[
  * int
  * main (int argc, char **argv)
  * {
@@ -80,7 +80,7 @@
  *   /&ast; The user lost interest &ast;/
  *   return 0;
  * }
- * </programlisting>
+ * ]|
  * </example>
  * <para>
  * It's OK to use the GLib main loop directly instead of gtk_main(), though it
@@ -1253,14 +1253,14 @@ gtk_main_quit (void)
  *
  * <example>
  * <title>Updating the UI during a long computation</title>
- * <programlisting>
+ * |[
  *  /&ast; computation going on... &ast;/
  *
  *  while (gtk_events_pending ())
  *    gtk_main_iteration ();
  *
  *  /&ast; ...computation continued &ast;/
- * </programlisting>
+ * ]|
  * </example>
  *
  * Returns: %TRUE if any events are pending, %FALSE otherwise
@@ -1828,7 +1828,7 @@ gtk_main_do_event (GdkEvent *event)
  *
  * <example>
  * <title>A persistent window</title>
- * <programlisting>
+ * |[
  * #include &lt;gtk/gtk.h>&lt;
  *
  * int
@@ -1855,7 +1855,7 @@ gtk_main_do_event (GdkEvent *event)
  *
  *   return 0;
  * }
- * </programlisting>
+ * ]|
  * </example>
  *
  * Returns: %TRUE
index 22317cf990b84e7cd6b3838daafdaadcad6e0450..dfd217d041bc737b4d510c4d1ff1bf8256c673ee 100644 (file)
  *
  * <example>
  * <title>Connecting the popup signal handler.</title>
- * <programlisting>
+ * |[
  *   /<!---->* connect our handler which will popup the menu *<!---->/
  *   g_signal_connect_swapped (window, "button_press_event",
  *     G_CALLBACK (my_popup_handler), menu);
- * </programlisting>
+ * ]|
  * </example>
  *
  * <example>
  * <title>Signal handler which displays a popup menu.</title>
- * <programlisting>
+ * |[
  * static gint
  * my_popup_handler (GtkWidget *widget, GdkEvent *event)
  * {
@@ -83,7 +83,7 @@
  * 
  *   return FALSE;
  * }
- * </programlisting>
+ * ]|
  * </example>
  */
 
index 80b9c5d47258b4ec0914fad0d9c5095f0580c4b8..fdde639e5f7607e2a7d108cb6bd03309911ff6ec 100644 (file)
  *
  * <example>
  * <title>Setting markup and accelerator on a MenuItem</title>
- * <programlisting><![CDATA[
+ * |[
  * GtkWidget *child = gtk_bin_get_child (GTK_BIN (menu_item));
  * gtk_label_set_markup (GTK_LABEL (child), "<i>new label</i> with <b>markup</b>");
  * gtk_accel_label_set_accel (GTK_ACCEL_LABEL (child), GDK_KEY_1, 0);
- * ]]></programlisting>
+ * ]|
  * </example>
  *
  * <refsect2 id="GtkMenuItem-BUILDER-UI">
  * attribute of a &lt;child&gt; element.
  * <example>
  * <title>A UI definition fragment with submenus</title>
- * <programlisting><![CDATA[
+ * |[
  * <object class="GtkMenuItem">
  *   <child type="submenu">
  *     <object class="GtkMenu"/>
  *   </child>
  * </object>
- * ]]></programlisting>
+ * ]|
  * </example>
  * </refsect2>
  */
index 0c47e14172932712d3cd821aef22548c017c33c2..7d9eae47d21834600ea1bd1b7491102082176855 100644 (file)
  *
  * <example>
  * <title>A UI definition fragment with menus</title>
- * <programlisting><![CDATA[
+ * |[
  * <object class="GtkMenuToolButton">
  *   <child type="menu">
  *     <object class="GtkMenu"/>
  *   </child>
  * </object>
- * ]]></programlisting>
+ * ]|
  * </example>
  * </para>
  * </refsect2>
index 83ff9ffb1534238e9d9903bb6bf923562231092e..4d4d9f048ac2932a5e9f56ffc8a9ca02e8da5540 100644 (file)
@@ -59,7 +59,7 @@
  * returns when any dialog button is clicked.
  * <example>
  * <title>A modal dialog.</title>
- * <programlisting>
+ * |[
  *  dialog = gtk_message_dialog_new (main_application_window,
  *                                   GTK_DIALOG_DESTROY_WITH_PARENT,
  *                                   GTK_MESSAGE_ERROR,
  *                                   filename, g_strerror (errno));
  *  gtk_dialog_run (GTK_DIALOG (dialog));
  *  gtk_widget_destroy (dialog);
- * </programlisting>
+ * ]|
  * </example>
  * You might do a non-modal #GtkMessageDialog as follows:
  * <example>
  * <title>A non-modal dialog.</title>
- * <programlisting>
+ * |[
  *  dialog = gtk_message_dialog_new (main_application_window,
  *                                   GTK_DIALOG_DESTROY_WITH_PARENT,
  *                                   GTK_MESSAGE_ERROR,
@@ -85,7 +85,7 @@
  *  g_signal_connect_swapped (dialog, "response",
  *                            G_CALLBACK (gtk_widget_destroy),
  *                            dialog);
- * </programlisting>
+ * ]|
  * </example>
  *
  * <refsect2 id="GtkMessageDialog-BUILDER-UI">
@@ -800,13 +800,13 @@ gtk_message_dialog_format_secondary_text (GtkMessageDialog *message_dialog,
  * may contain special XML characters, you should use g_markup_printf_escaped()
  * to escape it.
 
- * <informalexample><programlisting>
+ * |[
  * gchar *msg;
  *
  * msg = g_markup_printf_escaped (message_format, ...);
  * gtk_message_dialog_format_secondary_markup (message_dialog, "&percnt;s", msg);
  * g_free (msg);
- * </programlisting></informalexample>
+ * ]|
  *
  * Since: 2.6
  */
index 21da499dc7998933eec46b2afd3002564ccf7240..0c216dc2b928f8bbd4f0f4f0e66145759f218da0 100644 (file)
@@ -80,7 +80,7 @@
  * </para>
  * <example>
  * <title>A UI definition fragment with GtkNotebook</title>
- * <programlisting><![CDATA[
+ * |[
  * <object class="GtkNotebook">
  *   <child>
  *     <object class="GtkLabel" id="notebook-content">
@@ -93,7 +93,7 @@
  *     </object>
  *   </child>
  * </object>
- * ]]></programlisting>
+ * ]|
  * </example>
  * </refsect2>
  */
index 346c16dc049020ed6c667f591480cadb17a12ad2..8bb1c4094dc0ecd16b512d7fce6f45f5a06c2ce4 100644 (file)
@@ -50,7 +50,7 @@
  *
  * <example>
  * <title>A page setup dialog</title>
- * <programlisting>
+ * |[
  * static GtkPrintSettings *settings = NULL;
  * static GtkPageSetup *page_setup = NULL;
  *
@@ -70,7 +70,7 @@
  *
  *   page_setup = new_page_setup;
  * }
- * </programlisting>
+ * ]|
  * </example>
  *
  * Printing support was added in GTK+ 2.10.
index 73aa1aa0913921217bffa15312973b8dada5d6ba..7b9ceab985a97873d455c2f944e49888bdb27395 100644 (file)
@@ -75,7 +75,7 @@
  *
  * <example>
  * <title>Creating a paned widget with minimum sizes.</title>
- * <programlisting>
+ * |[
  * GtkWidget *hpaned = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
  * GtkWidget *frame1 = gtk_frame_new (NULL);
  * GtkWidget *frame2 = gtk_frame_new (NULL);
@@ -89,7 +89,7 @@
  *
  * gtk_paned_pack2 (GTK_PANED (hpaned), frame2, FALSE, FALSE);
  * gtk_widget_set_size_request (frame2, 50, -1);
- * </programlisting>
+ * ]|
  * </example>
  */
 
index 4d55b75e7858bbedfc07c522e5ea8ab054230e6c..10c79d23ba379696292f44e15064407d69560e7e 100644 (file)
@@ -37,7 +37,7 @@
  *
  * <example>
  * <title>Using GtkPrintContext in a #GtkPrintOperation::draw-page callback</title>
- * <programlisting>
+ * |[
  * static void
  * draw_page (GtkPrintOperation *operation,
  *        GtkPrintContext   *context,
@@ -89,7 +89,7 @@
  *
  *   g_object_unref (layout);
  * }
- * </programlisting>
+ * ]|
  * </example>
  *
  * Printing support was added in GTK+ 2.10.
index 60f2a93b889205af2eb9c788fb364918efdff298..7c20bd8fdd1bbc67abbcc11fa1e7c0fad44ca013 100644 (file)
@@ -61,7 +61,7 @@
  *
  * <example>
  * <title>The high-level printing API</title>
- * <programlisting>
+ * |[
  * static GtkPrintSettings *settings = NULL;
  *
  * static void
@@ -90,7 +90,7 @@
  *
  *   g_object_unref (print);
  * }
- * </programlisting>
+ * ]|
  * </example>
  *
  * By default GtkPrintOperation uses an external application to do
index d7da9515f30dce44916c8f829c72250561e54515..4891cd4f0b05e68d38fb9ff2de2983cd6c04a19a 100644 (file)
  *
  * <example>
  * <title>A #GtkPrintUnixDialog UI definition fragment.</title>
- * <programlisting><![CDATA[
+ * |[
  * <object class="GtkPrintUnixDialog" id="dialog1">
  *   <child internal-child="notebook">
  *     <object class="GtkNotebook" id="notebook">
  *     </object>
  *   </child>
  * </object>
- * ]]></programlisting>
+ * ]|
  * </example>
  * </para>
  * </refsect2>
index 5232ce479eefdaff7a9cadc43dfd27761181011f..3535b28cb93dd33146cc7ec99881c41946bf42b4 100644 (file)
@@ -70,7 +70,7 @@
  *
  * <example>
  * <title>How to create a group of two radio buttons.</title>
- * <programlisting>
+ * |[
  * void create_radio_buttons (void) {
  *
  *    GtkWidget *window, *radio1, *radio2, *box, *entry;
@@ -95,7 +95,7 @@
  *    gtk_widget_show_all (window);
  *    return;
  * }
- * </programlisting>
+ * ]|
  * </example>
  *
  * When an unselected button in the group is clicked the clicked button
index 607579bab7ad2957556bde94c21e9b097f4801c8..008b33773ed98700dea274f136b287fa8c639887 100644 (file)
@@ -48,7 +48,7 @@
  *
  * <example>
  * <title>How to create a group of radio menu items.</title>
- * <programlisting>
+ * |[
  * GSList *group = NULL;
  * GtkWidget *item;
  * gint i;
@@ -60,7 +60,7 @@
  *   if (i == 1)
  *     gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (item), TRUE);
  * }
- * </programlisting>
+ * ]|
  * </example>
  */
 
index 181bff5bb7059766220a78ca2bd0159634dbbaa0..85fba519d2e6f89a8823e3db9eaa20d0c3f4bb1e 100644 (file)
@@ -48,7 +48,7 @@
  * <title>Typical usage</title>
  * In the simplest of cases, you can use the following code to use
  * a #GtkRecentChooserDialog to select a recently used file:
- * <programlisting>
+ * |[
  * GtkWidget *dialog;
  *
  * dialog = gtk_recent_chooser_dialog_new ("Recent Documents",
@@ -67,7 +67,7 @@
  *   }
  *
  * gtk_widget_destroy (dialog);
- * </programlisting>
+ * ]|
  * </example>
  *
  * Recently used files are supported since GTK+ 2.10.
index 08c260a2bb21d76a64fe7301b6423ec332a0d608..df690345b03d82e06446d601b6b461c19073880b 100644 (file)
@@ -52,7 +52,7 @@
  *
  * <example>
  * <title>A UI definition fragment specifying GtkRecentFilter rules</title>
- * <programlisting><![CDATA[
+ * |[
  * <object class="GtkRecentFilter">
  *   <mime-types>
  *     <mime-type>text/plain</mime-type>
@@ -68,7 +68,7 @@
  *     <application>glade</application>
  *   </applications>
  * </object>
- * ]]></programlisting>
+ * ]|
  * </example>
  * </para>
  * </refsect2>
index c5ee8bde55b51299b14e40b766d38ed123cc1b26..4cfee45cc267bfe15e18611af1607bef44d2d555 100644 (file)
  *
  * <example>
  * <title>Creating a search bar</title>
- * <programlisting>
+ * |[
  * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../examples/search-bar.c">
  *  <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
  * </xi:include>
- * </programlisting>
+ * ]|
  * </example>
  *
  * Since: 3.10
@@ -168,7 +168,7 @@ preedit_changed_cb (GtkEntry  *entry,
  *
  * <example>
  * <title>Showing the search bar on key presses</title>
- * <programlisting><![CDATA[
+ * |[
  * static gboolean
  * window_key_press_event_cb (GtkWidget *widget,
  *                            GdkEvent  *event,
@@ -179,7 +179,7 @@ preedit_changed_cb (GtkEntry  *entry,
  *
  * g_signal_connect (window, "key-press-event",
  *                   G_CALLBACK (window_key_press_event_cb), search_bar);
- * ]]></programlisting>
+ * ]|
  * </example>
  *
  * Return value: %GDK_EVENT_STOP if the key press event resulted
index 7e7028d50d6e2cfcc2712d70bee80751e311bc0b..cce10660b92d2acc4dd9affa1d2882895a7d8b61 100644 (file)
  * need to be aware that settings that are specific to individual widgets
  * may not be available before the widget type has been realized at least
  * once. The following example demonstrates a way to do this:
- * <informalexample><programlisting>
+ * |[
  *   gtk_init (&argc, &argv);
  *
  *   /&ast; make sure the type is realized &ast;/
  *   g_type_class_unref (g_type_class_ref (GTK_TYPE_IMAGE_MENU_ITEM));
  *
  *   g_object_set (gtk_settings_get_default (), "gtk-enable-animations", FALSE, NULL);
- * </programlisting></informalexample>
+ * ]|
  *
  * There is one GtkSettings instance per screen. It can be obtained with
  * gtk_settings_get_for_screen(), but in many cases, it is more convenient
@@ -716,11 +716,11 @@ gtk_settings_class_init (GtkSettingsClass *class)
    * GtkSettings:gtk-color-scheme:
    *
    * A palette of named colors for use in themes. The format of the string is
-   * <programlisting>
+   * |[
    * name1: color1
    * name2: color2
    * ...
-   * </programlisting>
+   * ]|
    * Color names must be acceptable as identifiers in the
    * <link linkend="gtk3-Resource-Files">gtkrc</link> syntax, and
    * color specifications must be in the format accepted by
@@ -732,9 +732,9 @@ gtk_settings_class_init (GtkSettingsClass *class)
    *
    * Starting with GTK+ 2.12, the entries can alternatively be separated
    * by ';' instead of newlines:
-   * <programlisting>
+   * |[
    * name1: color1; name2: color2; ...
-   * </programlisting>
+   * ]|
    *
    * Since: 2.10
    *
index bb949c65ec946efb943f33b56f4a218d5e548e29..e98cfef43cd8a26a5c8d081434a186780332ec41 100644 (file)
@@ -94,7 +94,7 @@
  *
  * <example>
  * <title>A UI definition fragment with GtkSizeGroup</title>
- * <programlisting><![CDATA[
+ * |[
  * <object class="GtkSizeGroup">
  *   <property name="mode">GTK_SIZE_GROUP_HORIZONTAL</property>
  *   <widgets>
  *     <widget name="radio2"/>
  *   </widgets>
  * </object>
- * ]]></programlisting>
+ * ]|
  * </example>
  * </para>
  * </refsect2>
index f87c31dbd132c36283065aeb3b8174e4cb2cbf5d..ebe3f7b74f9cb159a9ca845e5cf994ff6be93659 100644 (file)
@@ -70,7 +70,7 @@
  *
  * <example>
  * <title>Obtaining the window ID of a socket.</title>
- * <programlisting>
+ * |[
  * GtkWidget *socket = gtk_socket_new (<!-- -->);
  * gtk_widget_show (socket);
  * gtk_container_add (GTK_CONTAINER (parent), socket);
@@ -81,7 +81,7 @@
  * gtk_widget_realize (socket);
  * g_print ("The ID of the sockets window is %#x\n",
  *          gtk_socket_get_id (socket));
- * </programlisting>
+ * ]|
  * </example>
  *
  * Note that if you pass the window ID of the socket to another
index 694d59bcafe4c5819a05b75905878ba9137f51d1..5ef8e7daa1d4ff89439f785d9a89c0aded9530c0 100644 (file)
@@ -80,7 +80,7 @@
  *
  * <example>
  * <title>Using a GtkSpinButton to get an integer</title>
- * <programlisting>
+ * |[
  * /&ast; Provides a function to retrieve an integer value from a
  *  &ast; GtkSpinButton and creates a spin button to model percentage
  *  &ast; values.
  *
  *   gtk_widget_show_all (window);
  * }
- * </programlisting>
+ * ]|
  * </example>
  *
  * <example>
  * <title>Using a GtkSpinButton to get a floating point value</title>
- * <programlisting>
+ * |[
  * /&ast; Provides a function to retrieve a floating point value from a
  *  &ast; GtkSpinButton, and creates a high precision spin button.
  *  &ast;/
  *
  *   gtk_widget_show_all (window);
  * }
- * </programlisting>
+ * ]|
  * </example>
  */
 
index 21b3d6ead45e9cbd3fcd745609cf8742c9702884..cee9d65cc757aa3a5f55137db6df3ba1989f1050 100644 (file)
  * </para>
  * <example>
  * <title>Using an enumeration to identify  animatable regions</title>
- * <programlisting>
+ * |[
  * enum {
  *   REGION_ENTRY,
  *   REGION_BUTTON_UP,
  *
  *   ...
  * }
- * </programlisting>
+ * ]|
  * </example>
  * <para>
  * For complex widgets with an arbitrary number of animatable regions, it
  * </para>
  * <example>
  * <title>Using struct pointers to identify animatable regions</title>
- * <programlisting>
+ * |[
  * void
  * notebook_draw_tab (GtkWidget    *widget,
  *                    NotebookPage *page,
  *   gtk_render_extension (cr, page->x, page->y, page->width, page->height);
  *   gtk_style_context_pop_animatable_region (context);
  * }
- * </programlisting>
+ * ]|
  * </example>
  * <para>
  * The widget also needs to notify the style context about a state change
  * </para>
  * <example>
  * <title>Triggering a state change animation on a region</title>
- * <programlisting>
+ * |[
  * gboolean
  * notebook_motion_notify (GtkWidget      *widget,
  *                         GdkEventMotion *event)
  *                                          TRUE);
  *   ...
  * }
- * </programlisting>
+ * ]|
  * </example>
  * <para>
  * gtk_style_context_notify_state_change() accepts %NULL region IDs as a
@@ -1890,15 +1890,15 @@ region_find (GArray *array,
  * In the CSS file format, a #GtkEntry defining an "entry"
  * class, would be matched by:
  *
- * <programlisting>
+ * |[
  * GtkEntry.entry { ... }
- * </programlisting>
+ * ]|
  *
  * While any widget defining an "entry" class would be
  * matched by:
- * <programlisting>
+ * |[
  * .entry { ... }
- * </programlisting>
+ * ]|
  *
  * Since: 3.0
  **/
@@ -2115,16 +2115,16 @@ _gtk_style_context_check_region_name (const gchar *str)
  * In the CSS file format, a #GtkTreeView defining a "row"
  * region, would be matched by:
  *
- * <programlisting>
+ * |[
  * GtkTreeView row { ... }
- * </programlisting>
+ * ]|
  *
  * Pseudo-classes are used for matching @flags, so the two
  * following rules:
- * <programlisting>
+ * |[
  * GtkTreeView row:nth-child(even) { ... }
  * GtkTreeView row:nth-child(odd) { ... }
- * </programlisting>
+ * ]|
  *
  * would apply to even and odd rows, respectively.
  *
@@ -2940,16 +2940,16 @@ gtk_style_context_lookup_color (GtkStyleContext *context,
  *
  * As a practical example, a #GtkButton notifying a state transition on
  * the prelight state:
- * <programlisting>
+ * |[
  * gtk_style_context_notify_state_change (context,
  *                                        gtk_widget_get_window (widget),
  *                                        NULL,
  *                                        GTK_STATE_PRELIGHT,
  *                                        button->in_button);
- * </programlisting>
+ * ]|
  *
  * Can be handled in the CSS file like this:
- * <programlisting>
+ * |[
  * GtkButton {
  *     background-color: &num;f00
  * }
@@ -2958,7 +2958,7 @@ gtk_style_context_lookup_color (GtkStyleContext *context,
  *     background-color: &num;fff;
  *     transition: 200ms linear
  * }
- * </programlisting>
+ * ]|
  *
  * This combination will animate the button background from red to white
  * if a pointer enters the button, and back to red if the pointer leaves
index 571fdf8dcb6c5853839773995aeef3f85690bcf3..ee1907b832c48777fd5946b703d11f8b96a42ec1 100644 (file)
  *
  * <example>
  * <title>A UI definition fragment specifying tags</title>
- * <programlisting><![CDATA[
+ * |[
  * <object class="GtkTextTagTable">
  *  <child type="tag">
  *    <object class="GtkTextTag"/>
  *  </child>
  * </object>
- * ]]></programlisting>
+ * ]|
  * </example>
  * </para>
  * </refsect2>
index 136fcc657f90ba44724c8ef2c69257d2e3c85391..d6e40dc08630c1d81e34baccce60547bd15eb576 100644 (file)
@@ -250,9 +250,9 @@ gtk_theming_engine_class_init (GtkThemingEngineClass *klass)
    * custom properties, for a theming engine named "Clearlooks" registering
    * a "glossy" custom property, it could be referenced in the CSS file as
    *
-   * <programlisting>
+   * |[
    * -Clearlooks-glossy: true;
-   * </programlisting>
+   * ]|
    *
    * Since: 3.0
    */
index 21eab4a54e7fd4933bc6175485840181d1b34ec5..ee65d2bc86975bcbba42e1a4ca90f806677ce069 100644 (file)
@@ -60,7 +60,7 @@
  *
  * <example>
  * <title>Creating two #GtkToggleButton widgets.</title>
- * <programlisting>
+ * |[
  * void make_toggles (void) {
  *    GtkWidget *dialog, *toggle1, *toggle2;
  *
@@ -84,7 +84,7 @@
  *
  *    gtk_widget_show_all (dialog);
  * }
- * </programlisting>
+ * ]|
  * </example>
  */
 
index d22eda6861bdee7626bc12960cd159f79b17350e..14060f4cf3a168826d794cc53617135a28379e5e 100644 (file)
  *
  * <example>
  * <title>Acquiring a #GtkTreeIter-struct</title>
- * <programlisting>
+ * |[
  *  /&ast; Three ways of getting the iter pointing to the location &ast;/
  * GtkTreePath *path;
  * GtkTreeIter iter;
  * gtk_tree_model_iter_nth_child (model, &amp;iter, &amp;parent_iter, 2);
  * parent_iter = iter;
  * gtk_tree_model_iter_nth_child (model, &amp;iter, &amp;parent_iter, 5);
- * </programlisting>
+ * ]|
  * </example>
  *
  * This second example shows a quick way of iterating through a list
  *
  * <example>
  * <title>Reading data from a #GtkTreeModel</title>
- * <programlisting>
+ * |[
  * enum
  * {
  *   STRING_COLUMN,
  *
  *    row_count++;
  *  }
- * </programlisting>
+ * ]|
  * </example>
  *
  * The #GtkTreeModel interface contains two methods for reference
index 415a05365c605963c59ecb1709b1852cc805ee4d..effdc3a4f3be233e543d0df1e3bb73a2db7ceb17 100644 (file)
@@ -3828,7 +3828,7 @@ gtk_tree_model_filter_get_model (GtkTreeModelFilter *filter)
  * empty. The visible function should therefore take special care of empty
  * rows, like in the example below.
  *
- * <informalexample><programlisting>
+ * |[
  * static gboolean
  * visible_func (GtkTreeModel *model,
  *               GtkTreeIter  *iter,
@@ -3845,7 +3845,7 @@ gtk_tree_model_filter_get_model (GtkTreeModelFilter *filter)
  *
  *   return visible;
  * }
- * </programlisting></informalexample>
+ * ]|
  *
  * Since: 2.4
  */
index 54b369697fc3266a4f7ba28f90c468c818915fc4..3afe77d72bd6734b42d2e777e856a69888d59726 100644 (file)
@@ -52,7 +52,7 @@
  *
  * <example>
  * <title>Using a #GtkTreeModelSort</title>
- * <programlisting>
+ * |[
  * {
  *   GtkTreeView *tree_view1;
  *   GtkTreeView *tree_view2;
@@ -77,7 +77,7 @@
  *   gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (sort_model2),
  *                                         COLUMN_1, GTK_SORT_DESCENDING);
  * }
- * </programlisting>
+ * ]|
  * </example>
  *
  * To demonstrate how to access the underlying child model from the sort
@@ -88,7 +88,7 @@
  *
  * <example>
  * <title>Accessing the child model of in a selection changed callback</title>
- * <programlisting>
+ * |[
  * void
  * selection_changed (GtkTreeSelection *selection, gpointer data)
  * {
  *                       -1);
  *   g_free (modified_data);
  * }
- * </programlisting>
+ * ]|
  * </example>
  */
 
index a67a01ed47c2fda3a9f195d198a7b9abc95cb4bf..9d002adff67537c6c60df7489ccbdef8593a73f3 100644 (file)
@@ -49,7 +49,7 @@
  * column. The "type" attribute specifies the data type for the column.
  * <example>
  * <title>A UI Definition fragment for a tree store</title>
- * <programlisting><![CDATA[
+ * |[
  * <object class="GtkTreeStore">
  *   <columns>
  *     <column type="gchararray"/>
@@ -57,7 +57,7 @@
  *     <column type="gint"/>
  *   </columns>
  * </object>
- * ]]></programlisting>
+ * ]|
  * </example>
  * </refsect2>
  */
index a84454336ce15c91038a662760db6e9c7f9714e6..43956f1f44156b69fd28c99fb8b2e371e6d0bab7 100644 (file)
  * internal #GtkTreeSelection in UI definitions.
  * <example>
  * <title>A UI definition fragment with GtkTreeView</title>
- * <programlisting><![CDATA[
+ * |[
  * <object class="GtkTreeView" id="treeview">
  *   <property name="model">liststore1</property>
  *   <child>
  *     </object>
  *   </child>
  * </object>
- * ]]></programlisting>
+ * ]|
  * </example>
  * </refsect2>
  */
index fb6982da02fdb1c29570e7a5e238cd8fd38b9e04..68e87a2cf1c4058428fa93bb188c5dfe03c14e14 100644 (file)
  * Here are some examples of how a %GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH widget
  * generally deals with width-for-height requests, for #GtkWidgetClass.get_preferred_height()
  * it will do:
- * <programlisting><![CDATA[
+ * |[
  * static void
  * foo_widget_get_preferred_height (GtkWidget *widget, gint *min_height, gint *nat_height)
  * {
  *         it will return the minimum and natural height for the rotated label here.
  *      }
  * }
- * ]]></programlisting>
+ * ]|
  *
  * And in #GtkWidgetClass.get_preferred_width_for_height() it will simply return
  * the minimum and natural width:
  *
- * <programlisting><![CDATA[
+ * |[
  * static void
  * foo_widget_get_preferred_width_for_height (GtkWidget *widget, gint for_height,
  *                                            gint *min_width, gint *nat_width)
  *         height calculation here.
  *      }
  * }
- * ]]></programlisting>
+ * ]|
  *
  * Often a widget needs to get its own request during size request or
  * allocation. For example, when computing height it may need to also
  * be careful to call its virtual methods directly, like this:
  * <example>
  *   <title>Widget calling its own size request method.</title>
- *   <programlisting>
+ *   |[
  * GTK_WIDGET_GET_CLASS(widget)-&gt;get_preferred_width (widget),
  *                                  &min, &natural);
- *   </programlisting>
+ *   ]|
  * </example>
  *
  * It will not work to use the wrapper functions, such as
  * </para>
  * <example>
  * <title>A UI definition fragment specifying an accelerator</title>
- * <programlisting><![CDATA[
+ * |[
  * <object class="GtkButton">
  *   <accelerator key="q" modifiers="GDK_CONTROL_MASK" signal="clicked"/>
  * </object>
- * ]]></programlisting>
+ * ]|
  * </example>
  * <para>
  * In addition to accelerators, #GtkWidget also support a
  * </para>
  * <example>
  * <title>A UI definition fragment specifying an accessible</title>
- * <programlisting><![CDATA[
+ * |[
  * <object class="GtkButton" id="label1"/>
  *   <property name="label">I am a Label for a Button</property>
  * </object>
  *     </object>
  *   </child>
  * </object>
- * ]]></programlisting>
+ * ]|
  * </example>
  * <para>
  * Finally, GtkWidget allows style information such as style classes to
  * be associated with widgets, using the custom &lt;style&gt; element:
  * <example>
  * <title>A UI definition fragment specifying an style class</title>
- * <programlisting><![CDATA[
+ * |[
  * <object class="GtkButton" id="button1">
  *   <style>
  *     <class name="my-special-button-class"/>
  *     <class name="dark-button"/>
  *   </style>
  * </object>
- * ]]></programlisting>
+ * ]|
  * </example>
  * </para>
  * </refsect2>
  * <para>
  * <example>
  * <title>A GtkBuilder Template Definition</title>
- * <programlisting><![CDATA[
+ * |[
  * <interface>
  *   <template class="FooWidget" parent="GtkBox">
  *     <property name="orientation">GTK_ORIENTATION_HORIZONTAL</property>
  *     </child>
  *   </template>
  * </interface>
- * ]]></programlisting>
+ * ]|
  * </example>
  * </para>
  * </refsect2>
index 342ddeccf6f12c68f4d89344f60912f697006a1d..7c56bd7b8c8a013fc31976a91e1bb6c0ab74380d 100644 (file)
@@ -42,7 +42,7 @@
  * The widget path generation is generally simple:
  * <example>
  * <title>Defining a button within a window</title>
- * <programlisting>
+ * |[
  * {
  *   GtkWidgetPath *path;
  *
@@ -50,7 +50,7 @@
  *   gtk_widget_path_append_type (path, GTK_TYPE_WINDOW);
  *   gtk_widget_path_append_type (path, GTK_TYPE_BUTTON);
  * }
- * </programlisting>
+ * ]|
  * </example>
  *
  * Although more complex information, such as widget names, or
@@ -59,7 +59,7 @@
  *
  * <example>
  * <title>Defining the first tab widget in a notebook</title>
- * <programlisting>
+ * |[
  * {
  *   GtkWidgetPath *path;
  *   guint pos;
@@ -72,7 +72,7 @@
  *   pos = gtk_widget_path_append_type (path, GTK_TYPE_LABEL);
  *   gtk_widget_path_iter_set_name (path, pos, "first tab label");
  * }
- * </programlisting>
+ * ]|
  * </example>
  *
  * All this information will be used to match the style information
index d557abbf2fc2d9ff7625bb600eadbd85b3a223bd..6d43b263734e8cd75ac18640079649d72b8bdc06 100644 (file)
  * </para>
  * <example>
  * <title>A UI definition fragment with accel groups</title>
- * <programlisting><![CDATA[
+ * |[
  * <object class="GtkWindow">
  *   <accel-groups>
  *     <group name="accelgroup1"/>
  * ...
  * <!-- -->
  * <object class="GtkAccelGroup" id="accelgroup1"/>
- * ]]></programlisting>
+ * ]|
  * </example>
  * <para>
  * The GtkWindow implementation of the GtkBuildable interface